home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / Snippets / Processes / LaunchWithDoc2 / LaunchWithDoc 2 README next >
Encoding:
Text File  |  1994-07-18  |  1.4 KB  |  41 lines  |  [TEXT/ttxt]

  1. /*
  2.  *   LaunchWithDoc v 2
  3.  *
  4.  *   Greg Robbins  August 1993, 
  5.  *   modified by Nitin Ganatra, July 1994
  6.  *
  7.  *   Document-launching sample program
  8.  *   Loosely based on C.K. Haun's LaunchWithDoc
  9.  *
  10.  *   This snippet includes these useful routines:
  11.  *
  12.  *      OpenSpecifiedDocument
  13.  *        finds the creator application for a document, whether or not
  14.  *        the app is running, launches the app if necessary, and sends
  15.  *        the Apple Event necessary to get the app to open the document
  16.  *
  17.  *      FindApplicationFromDocument
  18.  *        searches the mounted volumes for the application which
  19.  *        created a document
  20.  *
  21.  *      LaunchApplicationWithDocument
  22.  *        launches an application which is not running and passes it
  23.  *        the OpenDocuments event as part of the launch parameters
  24.  *
  25.  *      SendOpenDocumentEventToProcess
  26.  *        sends an OpenDocuments Apple event to a running program
  27.  *
  28.  *      BuildOpenDocumentsEvent
  29.  *        utility function to build an 'odoc' event from a list of 
  30.  *        FSSpecs.
  31.  *
  32.  *  Remember that a target application need not be Apple event aware
  33.  *  in order for the OpenDocuments event to succeed (the System will
  34.  *  pull "puppet strings", simulating the events necessary to make the
  35.  *  target app open the document)
  36.  *
  37.  *  However, LaunchWithDoc must be high level event aware (as set in the
  38.  *  SIZE resource) in order to send Apple events using AESend
  39.  *
  40.  */
  41.